﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AB.ServiceDirectory.Design.WebUserControls.Frame
{
    public partial class RoleFrame : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ButtonOk_Click(object sender, EventArgs e)
        {
            string roles = GetRoles();

        }

        /// <summary>
        /// Gets the roles from checkbox.
        /// join roles
        /// </summary>
        /// <returns></returns>
        private string GetRoles()
        {
            string roles = string.Empty;
            if(CheckBoxFunder.Checked)
            {
                roles += CheckBoxFunder.Text;
            }
            if(CheckBoxLead.Checked)
            {
                roles += "," + CheckBoxLead.Text;
            }
            if(CheckBoxDelivery.Checked)
            {
                roles += "," + CheckBoxDelivery.Text;
            }
            if(CheckBoxAuditor.Checked)
            {
                roles += "," +CheckBoxAuditor.Text;
            }
            return roles;
        }

        protected void ButtonCancel_Click(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CheckBoxFunder_CheckedChanged(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CheckBoxLead_CheckedChanged(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CheckBoxDelivery_CheckedChanged(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void CheckBoxAuditor_CheckedChanged(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}